Closed Bug 1618130 Opened 4 years ago Closed 4 years ago

Add API to override platform DNS results

Categories

(Core :: Networking, task, P2)

task

Tracking

()

RESOLVED FIXED
mozilla75
Tracking Status
firefox75 --- fixed

People

(Reporter: valentin, Assigned: valentin)

References

Details

(Whiteboard: [necko-triaged])

Attachments

(1 file)

Historically our DNS resolution tests have been limited to using "localhost" or "ip6-localhost". While that's acceptable for most cases, it still limits the way we are able to write unit tests for DNS code.

Having a small service that allows us to synthesize responses coming from the platform DNS would be very helpful, and it could potentially be useful as a building block for some nice developer features (think /etc/hosts rules that only apply to the browser).

Flags: needinfo?(valentin.gosu)
Flags: needinfo?(valentin.gosu)

Push with failures: https://treeherder.mozilla.org/#/jobs?repo=autoland&group_state=expanded&resultStatus=testfailed%2Cbusted%2Cexception%2Crunning%2Cpending%2Crunnable&revision=319675493927290295d9ca508d99f5cdaa8b2a23&selectedJob=290665362&searchStr=Windows%2C10%2Cx64%2CShippable%2Copt%2CXpcshell%2Ctests%2Ctest-windows10-64-shippable%2Fopt-xpcshell-e10s-1%2CX%28X1%29

Failure log: https://treeherder.mozilla.org/logviewer.html#?job_id=290665362&repo=autoland

Backout link: https://hg.mozilla.org/integration/autoland/rev/5795562c815b832b04b1655ee3d0c66c1d3790d3

[task 2020-02-26T23:24:56.694Z] 23:24:56 INFO - TEST-START | netwerk/test/unit/test_dns_override.js
[task 2020-02-26T23:24:56.837Z] 23:24:56 WARNING - TEST-UNEXPECTED-FAIL | netwerk/test/unit/test_dns_override.js | xpcshell return code: 0
[task 2020-02-26T23:24:56.837Z] 23:24:56 INFO - TEST-INFO took 152ms
[task 2020-02-26T23:24:56.838Z] 23:24:56 INFO - >>>>>>>
[task 2020-02-26T23:24:56.838Z] 23:24:56 INFO - (xpcshell/head.js) | test MAIN run_test pending (1)
[task 2020-02-26T23:24:56.839Z] 23:24:56 INFO - (xpcshell/head.js) | test run_next_test 0 pending (2)
[task 2020-02-26T23:24:56.839Z] 23:24:56 INFO - (xpcshell/head.js) | test MAIN run_test finished (2)
[task 2020-02-26T23:24:56.840Z] 23:24:56 INFO - running event loop
[task 2020-02-26T23:24:56.840Z] 23:24:56 INFO - netwerk/test/unit/test_dns_override.js | Starting test_bad_IPs
[task 2020-02-26T23:24:56.841Z] 23:24:56 INFO - (xpcshell/head.js) | test test_bad_IPs pending (2)
[task 2020-02-26T23:24:56.841Z] 23:24:56 INFO - TEST-PASS | netwerk/test/unit/test_dns_override.js | test_bad_IPs - [test_bad_IPs : 47] . Should throw if input is not an IP address

Flags: needinfo?(valentin.gosu)
Status: NEW → RESOLVED
Closed: 4 years ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla75
See Also: → 1619303

Is the feature supposed to be available for addons?

Flags: needinfo?(valentin.gosu)

(In reply to Marat Tanalin from comment #8)

Is the feature supposed to be available for addons?

Not really. It is useful for tests.
May be useful for devtools, but this is still at an early stage.

You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: